﻿package com.sgcc.nfc.lock.di

import com.sgcc.nfc.lock.data.repository.AuthRepositoryImpl
import com.sgcc.nfc.lock.data.repository.DashboardRepositoryImpl
import com.sgcc.nfc.lock.data.repository.LockRepositoryImpl
import com.sgcc.nfc.lock.data.repository.LogRepositoryImpl
import com.sgcc.nfc.lock.data.repository.MapRepositoryImpl
import com.sgcc.nfc.lock.data.repository.NfcRepositoryImpl
import com.sgcc.nfc.lock.data.repository.RegionRepositoryImpl
import com.sgcc.nfc.lock.data.repository.RoomRepositoryImpl
import com.sgcc.nfc.lock.data.repository.UserRepositoryImpl
import com.sgcc.nfc.lock.data.repository.WarningRepositoryImpl
import com.sgcc.nfc.lock.domain.repository.AuthRepository
import com.sgcc.nfc.lock.domain.repository.DashboardRepository
import com.sgcc.nfc.lock.domain.repository.LockRepository
import com.sgcc.nfc.lock.domain.repository.LogRepository
import com.sgcc.nfc.lock.domain.repository.MapRepository
import com.sgcc.nfc.lock.domain.repository.NfcRepository
import com.sgcc.nfc.lock.domain.repository.RegionRepository
import com.sgcc.nfc.lock.domain.repository.RoomRepository
import com.sgcc.nfc.lock.domain.repository.UserRepository
import com.sgcc.nfc.lock.domain.repository.WarningRepository
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {

    @Binds
    @Singleton
    abstract fun bindAuthRepository(impl: AuthRepositoryImpl): AuthRepository

    @Binds
    @Singleton
    abstract fun bindLockRepository(impl: LockRepositoryImpl): LockRepository

    @Binds
    @Singleton
    abstract fun bindRoomRepository(impl: RoomRepositoryImpl): RoomRepository

    @Binds
    @Singleton
    abstract fun bindWarningRepository(impl: WarningRepositoryImpl): WarningRepository

    @Binds
    @Singleton
    abstract fun bindLogRepository(impl: LogRepositoryImpl): LogRepository

    @Binds
    @Singleton
    abstract fun bindUserRepository(impl: UserRepositoryImpl): UserRepository

    @Binds
    @Singleton
    abstract fun bindRegionRepository(impl: RegionRepositoryImpl): RegionRepository

    @Binds
    @Singleton
    abstract fun bindDashboardRepository(impl: DashboardRepositoryImpl): DashboardRepository

    @Binds
    @Singleton
    abstract fun bindMapRepository(impl: MapRepositoryImpl): MapRepository

    @Binds
    @Singleton
    abstract fun bindNfcRepository(impl: NfcRepositoryImpl): NfcRepository
}
